package com.g8.pethospitallearnbackend.entity;

import java.util.ArrayList;
import java.util.List;

public class LabExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public LabExample() {
        oredCriteria = new ArrayList<>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andLabIdIsNull() {
            addCriterion("lab_id is null");
            return (Criteria) this;
        }

        public Criteria andLabIdIsNotNull() {
            addCriterion("lab_id is not null");
            return (Criteria) this;
        }

        public Criteria andLabIdEqualTo(String value) {
            addCriterion("lab_id =", value, "labId");
            return (Criteria) this;
        }

        public Criteria andLabIdNotEqualTo(String value) {
            addCriterion("lab_id <>", value, "labId");
            return (Criteria) this;
        }

        public Criteria andLabIdGreaterThan(String value) {
            addCriterion("lab_id >", value, "labId");
            return (Criteria) this;
        }

        public Criteria andLabIdGreaterThanOrEqualTo(String value) {
            addCriterion("lab_id >=", value, "labId");
            return (Criteria) this;
        }

        public Criteria andLabIdLessThan(String value) {
            addCriterion("lab_id <", value, "labId");
            return (Criteria) this;
        }

        public Criteria andLabIdLessThanOrEqualTo(String value) {
            addCriterion("lab_id <=", value, "labId");
            return (Criteria) this;
        }

        public Criteria andLabIdLike(String value) {
            addCriterion("lab_id like", value, "labId");
            return (Criteria) this;
        }

        public Criteria andLabIdNotLike(String value) {
            addCriterion("lab_id not like", value, "labId");
            return (Criteria) this;
        }

        public Criteria andLabIdIn(List<String> values) {
            addCriterion("lab_id in", values, "labId");
            return (Criteria) this;
        }

        public Criteria andLabIdNotIn(List<String> values) {
            addCriterion("lab_id not in", values, "labId");
            return (Criteria) this;
        }

        public Criteria andLabIdBetween(String value1, String value2) {
            addCriterion("lab_id between", value1, value2, "labId");
            return (Criteria) this;
        }

        public Criteria andLabIdNotBetween(String value1, String value2) {
            addCriterion("lab_id not between", value1, value2, "labId");
            return (Criteria) this;
        }

        public Criteria andLabTypeIsNull() {
            addCriterion("lab_type is null");
            return (Criteria) this;
        }

        public Criteria andLabTypeIsNotNull() {
            addCriterion("lab_type is not null");
            return (Criteria) this;
        }

        public Criteria andLabTypeEqualTo(String value) {
            addCriterion("lab_type =", value, "labType");
            return (Criteria) this;
        }

        public Criteria andLabTypeNotEqualTo(String value) {
            addCriterion("lab_type <>", value, "labType");
            return (Criteria) this;
        }

        public Criteria andLabTypeGreaterThan(String value) {
            addCriterion("lab_type >", value, "labType");
            return (Criteria) this;
        }

        public Criteria andLabTypeGreaterThanOrEqualTo(String value) {
            addCriterion("lab_type >=", value, "labType");
            return (Criteria) this;
        }

        public Criteria andLabTypeLessThan(String value) {
            addCriterion("lab_type <", value, "labType");
            return (Criteria) this;
        }

        public Criteria andLabTypeLessThanOrEqualTo(String value) {
            addCriterion("lab_type <=", value, "labType");
            return (Criteria) this;
        }

        public Criteria andLabTypeLike(String value) {
            addCriterion("lab_type like", value, "labType");
            return (Criteria) this;
        }

        public Criteria andLabTypeNotLike(String value) {
            addCriterion("lab_type not like", value, "labType");
            return (Criteria) this;
        }

        public Criteria andLabTypeIn(List<String> values) {
            addCriterion("lab_type in", values, "labType");
            return (Criteria) this;
        }

        public Criteria andLabTypeNotIn(List<String> values) {
            addCriterion("lab_type not in", values, "labType");
            return (Criteria) this;
        }

        public Criteria andLabTypeBetween(String value1, String value2) {
            addCriterion("lab_type between", value1, value2, "labType");
            return (Criteria) this;
        }

        public Criteria andLabTypeNotBetween(String value1, String value2) {
            addCriterion("lab_type not between", value1, value2, "labType");
            return (Criteria) this;
        }

        public Criteria andLabNameIsNull() {
            addCriterion("lab_name is null");
            return (Criteria) this;
        }

        public Criteria andLabNameIsNotNull() {
            addCriterion("lab_name is not null");
            return (Criteria) this;
        }

        public Criteria andLabNameEqualTo(String value) {
            addCriterion("lab_name =", value, "labName");
            return (Criteria) this;
        }

        public Criteria andLabNameNotEqualTo(String value) {
            addCriterion("lab_name <>", value, "labName");
            return (Criteria) this;
        }

        public Criteria andLabNameGreaterThan(String value) {
            addCriterion("lab_name >", value, "labName");
            return (Criteria) this;
        }

        public Criteria andLabNameGreaterThanOrEqualTo(String value) {
            addCriterion("lab_name >=", value, "labName");
            return (Criteria) this;
        }

        public Criteria andLabNameLessThan(String value) {
            addCriterion("lab_name <", value, "labName");
            return (Criteria) this;
        }

        public Criteria andLabNameLessThanOrEqualTo(String value) {
            addCriterion("lab_name <=", value, "labName");
            return (Criteria) this;
        }

        public Criteria andLabNameLike(String value) {
            addCriterion("lab_name like", value, "labName");
            return (Criteria) this;
        }

        public Criteria andLabNameNotLike(String value) {
            addCriterion("lab_name not like", value, "labName");
            return (Criteria) this;
        }

        public Criteria andLabNameIn(List<String> values) {
            addCriterion("lab_name in", values, "labName");
            return (Criteria) this;
        }

        public Criteria andLabNameNotIn(List<String> values) {
            addCriterion("lab_name not in", values, "labName");
            return (Criteria) this;
        }

        public Criteria andLabNameBetween(String value1, String value2) {
            addCriterion("lab_name between", value1, value2, "labName");
            return (Criteria) this;
        }

        public Criteria andLabNameNotBetween(String value1, String value2) {
            addCriterion("lab_name not between", value1, value2, "labName");
            return (Criteria) this;
        }

        public Criteria andLabPriceIsNull() {
            addCriterion("lab_price is null");
            return (Criteria) this;
        }

        public Criteria andLabPriceIsNotNull() {
            addCriterion("lab_price is not null");
            return (Criteria) this;
        }

        public Criteria andLabPriceEqualTo(Double value) {
            addCriterion("lab_price =", value, "labPrice");
            return (Criteria) this;
        }

        public Criteria andLabPriceNotEqualTo(Double value) {
            addCriterion("lab_price <>", value, "labPrice");
            return (Criteria) this;
        }

        public Criteria andLabPriceGreaterThan(Double value) {
            addCriterion("lab_price >", value, "labPrice");
            return (Criteria) this;
        }

        public Criteria andLabPriceGreaterThanOrEqualTo(Double value) {
            addCriterion("lab_price >=", value, "labPrice");
            return (Criteria) this;
        }

        public Criteria andLabPriceLessThan(Double value) {
            addCriterion("lab_price <", value, "labPrice");
            return (Criteria) this;
        }

        public Criteria andLabPriceLessThanOrEqualTo(Double value) {
            addCriterion("lab_price <=", value, "labPrice");
            return (Criteria) this;
        }

        public Criteria andLabPriceIn(List<Double> values) {
            addCriterion("lab_price in", values, "labPrice");
            return (Criteria) this;
        }

        public Criteria andLabPriceNotIn(List<Double> values) {
            addCriterion("lab_price not in", values, "labPrice");
            return (Criteria) this;
        }

        public Criteria andLabPriceBetween(Double value1, Double value2) {
            addCriterion("lab_price between", value1, value2, "labPrice");
            return (Criteria) this;
        }

        public Criteria andLabPriceNotBetween(Double value1, Double value2) {
            addCriterion("lab_price not between", value1, value2, "labPrice");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {
        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}